home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / ixemul-complete / man / cat5 / tzfile.0
Text File  |  1996-09-01  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. TZFILE(5)                                               TZFILE(5)
  5.  
  6.  
  7. NNAAMMEE
  8.        tzfile - time zone information
  9.  
  10. SSYYNNOOPPSSIISS
  11.        ##iinncclluuddee <<ttzzffiillee..hh>>
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.        The  time  zone  information  files used by _t_z_s_e_t(3) begin
  15.        with bytes reserved for future use, followed by six  four-
  16.        byte  values  of type lloonngg, written in a ``standard'' byte
  17.        order (the high-order byte of the value is written first).
  18.        These values are, in order:
  19.  
  20.        _t_z_h___t_t_i_s_g_m_t_c_n_t
  21.               The  number  of  GMT/local indicators stored in the
  22.               file.
  23.  
  24.        _t_z_h___t_t_i_s_s_t_d_c_n_t
  25.               The number of standard/wall  indicators  stored  in
  26.               the file.
  27.  
  28.        _t_z_h___l_e_a_p_c_n_t
  29.               The number of leap seconds for which data is stored
  30.               in the file.
  31.  
  32.        _t_z_h___t_i_m_e_c_n_t
  33.               The number of "transition times" for which data  is
  34.               stored in the file.
  35.  
  36.        _t_z_h___t_y_p_e_c_n_t
  37.               The  number of "local time types" for which data is
  38.               stored in the file (must not be zero).
  39.  
  40.        _t_z_h___c_h_a_r_c_n_t
  41.               The number of characters of "time zone abbreviation
  42.               strings" stored in the file.
  43.  
  44.        The above header is followed by _t_z_h___t_i_m_e_c_n_t four-byte val-
  45.        ues of type lloonngg, sorted in ascending order.  These values
  46.        are written in ``standard'' byte order.  Each is used as a
  47.        transition time (as returned  by  _t_i_m_e(2))  at  which  the
  48.        rules   for   computing  local  time  change.   Next  come
  49.        _t_z_h___t_i_m_e_c_n_t one-byte values of type  uunnssiiggnneedd  cchhaarr;  each
  50.        one  tells  which of the different types of ``local time''
  51.        types described in the file is associated with  the  same-
  52.        indexed  transition  time.   These values serve as indices
  53.        into an array of _t_t_i_n_f_o structures that  appears  next  in
  54.        the file; these structures are defined as follows:
  55.  
  56.             struct ttinfo {
  57.                  long          tt_gmtoff;
  58.                  int           tt_isdst;
  59.                  unsigned int  tt_abbrind;
  60.             };
  61.  
  62.  
  63.  
  64.                                                                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TZFILE(5)                                               TZFILE(5)
  71.  
  72.  
  73.        Each  structure  is  written  as  a  four-byte  value  for
  74.        _t_t___g_m_t_o_f_f of type lloonngg, in a standard byte order, followed
  75.        by  a one-byte value for _t_t___i_s_d_s_t and a one-byte value for
  76.        _t_t___a_b_b_r_i_n_d.  In each structure, _t_t___g_m_t_o_f_f gives the number
  77.        of  seconds  to  be  added  to GMT, _t_t___i_s_d_s_t tells whether
  78.        _t_m___i_s_d_s_t should be set by  _l_o_c_a_l_t_i_m_e  _(_3_)  and  _t_t___a_b_b_r_i_n_d
  79.        serves  as  an index into the array of time zone abbrevia-
  80.        tion characters that follow the _t_t_i_n_f_o structure(s) in the
  81.        file.
  82.  
  83.        Then  there  are  _t_z_h___l_e_a_p_c_n_t  pairs  of four-byte values,
  84.        written in standard byte order; the first  value  of  each
  85.        pair  gives  the  time (as returned by _t_i_m_e_(_2_)_) at which a
  86.        leap second occurs; the second gives the _t_o_t_a_l  number  of
  87.        leap  seconds  to  be  applied  after the given time.  The
  88.        pairs of values are sorted in ascending order by time.
  89.  
  90.        Then there are  _t_z_h___t_t_i_s_s_t_d_c_n_t  standard/wall  indicators,
  91.        each  stored  as  a  one-byte value; they tell whether the
  92.        transition times associated with  local  time  types  were
  93.        specified  as  standard  time  or wall clock time, and are
  94.        used when a time zone file is used in handling POSIX-style
  95.        time zone environment variables.
  96.  
  97.        Finally  there  are  _t_z_h___t_t_i_s_g_m_t_c_n_t  GMT/local indicators,
  98.        each stored as a one-byte value;  they  tell  whether  the
  99.        transition  times  associated  with  local time types were
  100.        specified as GMT or local time, and are used when  a  time
  101.        zone  file is used in handling POSIX-style time zone envi-
  102.        ronment variables.
  103.  
  104.        _L_o_c_a_l_t_i_m_e uses the first standard-time _t_t_i_n_f_o structure in
  105.        the  file  (or  simply  the  first _t_t_i_n_f_o structure in the
  106.        absence  of   a   standard-time   structure)   if   either
  107.        _t_z_h___t_i_m_e_c_n_t  is zero or the time argument is less than the
  108.        first transition time recorded in the file.
  109.  
  110. SSEEEE AALLSSOO
  111.        newctime(3)
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                                                 2
  131.  
  132.  
  133.